<template>
  <div>
    <el-dialog
      title="查看随货同行单"
      :visible.sync="isShowFollowGoodsList"
      :before-close="handleClose">
      <el-editable
        :data="FollowGoodsListData"
        :columns="columnsList"
        height="350">
        <template
          slot="default-action"
          slot-scope="scope">
          <el-button
            @click="lookNote(scope.row)"
            type="text">查看</el-button>
        </template>
      </el-editable>
    </el-dialog>
  </div>
</template>
<script>
import ElEditable from '@components/el-editable'
import { columnsList } from '@/moduleComponents/beforeSettle/followGoodsNote/const'
import { wscSaleOrderGetPeer } from '@const/beforeSettleApi'
export default {
  components: { ElEditable },
  name: 'FollowGoodsNote',
  props: {
    isShowFollowGoodsList: {
      type: Boolean,
      default: false
    },
    roleType: {
      type: Number,
      default: 1 // 登录角色（1-医院 2-配送商）
    },
    settle: {
      type: Number,
      default: 1 // 1-结算前，2-结算后
    },
    FollowGoodsListData: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {
      columnsList
    }
  },
  methods: {
    lookNote (data) {
      this.$router.push({
        path: '/common/followGoods',
        query: {
          id: data.id,
          roleType: String(this.roleType),
          settle: String(this.settle)
        }
      })
    },
    handleClose () {
      this.$emit('cancelDialog', false)
    }
  }
}
</script>
<style lang="less">
</style>
